package mushystuff.dtb.core.model;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

@Entity
public class Task extends PersistableBean {
	
	public enum Status {
		NOT_STARTED(10), IN_PROGRESS(20), TO_BE_VERIFIED(30), DONE(50);

		private int level;

		Status(int level) {
			this.level = level;
		}

		public int level() {
			return level;
		}
	}
	
	private Sprint sprint;
	
	private UserStory assignedUserStory;
	
	private String description;
	
	private Status status;

	public Task() {
		super();
	}

	@ManyToOne
	public Sprint getSprint() {
		return sprint;
	}

	public void setSprint(Sprint sprint) {
		this.sprint = sprint;
	}

	@ManyToOne
	public UserStory getAssignedUserStory() {
		return assignedUserStory;
	}

	public void setAssignedUserStory(UserStory assignedUserStory) {
		this.assignedUserStory = assignedUserStory;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

}
